package com.itheima.C01;

import cn.hutool.core.util.ObjectUtil;

import java.util.Objects;

public class Test2 {
    public static void main(String[] args) {
        Pig pig1 = null;
        Pig pig2 = new Pig("佩奇", 10, "女");

        if (Objects.equals(pig1, pig2)) System.out.println("相等");
        else System.out.println("不相等");

        if (ObjectUtil.equals(pig1, pig2)) {
            System.out.println("hutool:相等");
        }
    }
}

